package org.springframework.test.factoryBean;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/7/29 16:09
 * @since JDK 1.8
 */
@Component
public class StudentFactory implements FactoryBean<Student>
{
	@Override
	public Student getObject() throws Exception
	{
		Student student = new Student();
		student.setUsername("zhangsan");
		student.setAge("15");
		return student;
	}

	@Override
	public Class<?> getObjectType()
	{
		return Student.class;
	}

}
